package com.woniu.controller.medicalService;

import com.woniu.service.medicalService.IHospitalReservationService;
import com.woniu.model.medicalService.entity.HospitalReservation;
import com.woniu.model.gh.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//医院预约表
@RestController
@RequestMapping("/ms_reservation")
public class HospitalReservationController {

    @Autowired
    private IHospitalReservationService hospitalReservationService;

    //按医院id查询所有预约
    @GetMapping("/findByHospitalId")
    public Result<List<HospitalReservation>> findByHospitalId(Long hospitalId){
        List<HospitalReservation> list = hospitalReservationService.findByHospitalId(hospitalId);
        return Result.ok(list);
    }

}
